﻿<controls:MetroWindow x:Class="ProjectGroep3.Login"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        Title="Login" Height="486.5" Width="556" Background="White" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" Icon="Resources/Groep3.png"  >

    <Window.Resources>
        <Storyboard x:Key="GridRegistreer">
            <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="GridLogin">
                <EasingThicknessKeyFrame KeyTime="0:0:0.5" Value="-550,0,0,0"/>
            </ThicknessAnimationUsingKeyFrames>
            <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="GridRegister">
                <EasingThicknessKeyFrame KeyTime="0:0:0.5" Value="-550,0,0,0"/>
            </ThicknessAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="GridLogin">
            <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="GridLogin">
                <EasingThicknessKeyFrame KeyTime="0:0:0.5" Value="0,0,0,0"/>
            </ThicknessAnimationUsingKeyFrames>
            <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="GridRegister">
                <EasingThicknessKeyFrame KeyTime="0:0:0.5" Value="550,0,0,0"/>
            </ThicknessAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <Window.BorderBrush>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="Black" Offset="0"/>
            <GradientStop Color="#FF762F2F" Offset="1"/>
        </LinearGradientBrush>
    </Window.BorderBrush>

    <Window.Triggers>
        <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="btnRegister">
            <BeginStoryboard x:Name="RegisterGrid_BeginStoryboard" Storyboard="{StaticResource GridRegistreer}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="btnBack">
            <BeginStoryboard x:Name="RegisterGrid_EndStoryboard" Storyboard="{StaticResource GridLogin}"/>
        </EventTrigger>
    </Window.Triggers>

    <Grid x:Name="GridLogin" Margin="0,0,-8,-1" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="0*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0*"/>
            <ColumnDefinition Width="0*"/>
            <ColumnDefinition Width="77*"/>
            <ColumnDefinition Width="16*"/>
            <ColumnDefinition Width="0*"/>
        </Grid.ColumnDefinitions>
        <TextBox x:Name="txtLogin" HorizontalAlignment="Left" Height="34" Margin="160,198,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="238" Grid.Column="2" TabIndex="0" BorderBrush="#CC119EDA" Focusable="True"/>
        <Button x:Name="btnLogin" Content="Login to reservation site" HorizontalAlignment="Left" Margin="160,276,0,0" VerticalAlignment="Top" Width="238" Click="btnLogin_Click" Grid.Column="2" Height="35" RenderTransformOrigin="0.757,0.062" TabIndex="2" Foreground="White" BorderBrush="#CC119EDA" Background="#CC119EDA" IsDefault="True"/>
        <Button x:Name="btnRegister" Content="Register" HorizontalAlignment="Left" VerticalAlignment="Top" Width="238" Grid.Column="2" Margin="160,385,0,0" Height="35" TabIndex="3" Click="btnRegister_Click" Background="#CC119EDA" BorderBrush="#CC119EDA" Foreground="White" />
        <Grid x:Name="GridRegister" Grid.Column="4" HorizontalAlignment="Left" Height="458" Margin="0,0,-558,0" VerticalAlignment="Top" Width="558" Background="White">
            <TextBox x:Name="txtRegisterUserName" HorizontalAlignment="Left" Margin="223,154,0,270" Height="34" TextWrapping="Wrap" Width="204" BorderBrush="#CC119EDA" TextChanged="txtRegisterUserName_TextChanged" Focusable="True"/>
            <PasswordBox x:Name="txtRegisterPass" PasswordChanged="txtRegisterPass_PasswordChanged" HorizontalAlignment="Left" Margin="223,0,0,222" Width="204" Height="34" VerticalAlignment="Bottom" BorderBrush="#CC119EDA"  />
            <PasswordBox x:Name="txtRegisterConfPass" PasswordChanged="txtRegisterConfPass_PasswordChanged" HorizontalAlignment="Left" Margin="223,258,0,0" VerticalAlignment="Top" Height="34" Width="204" BorderBrush="#CC119EDA"/>
            <TextBox x:Name="txtRegisterEmail" HorizontalAlignment="Left" Height="34" Margin="223,307,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="204" BorderBrush="#CC119EDA" TextChanged="txtRegisterEmail_TextChanged" />
            <ComboBox x:Name="cmbCompany" IsReadOnly="True" IsEditable="True" Text ="Select a company." Height="34" Margin="223,365,131,0" VerticalAlignment="Top" Width="204" RenderTransformOrigin="1.089,1.072" BorderBrush="#CC119EDA" Background="#CC119EDA" SelectionChanged="cmbCompany_SelectionChanged"/>
            <Button x:Name="btnBack" Content="Back" HorizontalAlignment="Left" Margin="223,404,0,0" VerticalAlignment="Top" Width="93" Background="#CC119EDA" BorderBrush="#CC119EDA" Foreground="White" Click="btnBack_Click"/>
            <Button x:Name="btnConfirm" Content="Confirm" HorizontalAlignment="Left" Margin="325,404,0,0" VerticalAlignment="Top" Width="102" Click="btnConfirm_Click" Foreground="White" BorderBrush="#CC119EDA" Background="#CC119EDA"/>
            <Label x:Name= "lblUserName" Content= "Username *" HorizontalAlignment="Left" Margin="64,156,0,0" VerticalAlignment="Top" Width="95" FontFamily="Arial" FontSize="16" Visibility="Visible" Foreground="#CC119EDA"/>
            <Label x:Name= "lblPassword" Content= "Password *" HorizontalAlignment="Left" Margin="64,204,0,0" VerticalAlignment="Top" Width="95" FontFamily="Arial" FontSize="16" Visibility="Visible" Foreground="#CC119EDA"/>
            <Label x:Name= "lblConfPass" Content= "Confrim password *" HorizontalAlignment="Left" Margin="62,262,0,0" VerticalAlignment="Top" Width="156" FontFamily="Arial" FontSize="16" Visibility="Visible" Foreground="#CC119EDA"/>
            <Label x:Name= "lblEmail" Content= "Email *" HorizontalAlignment="Left" Margin="64,311,0,0" VerticalAlignment="Top" Width="95" FontFamily="Arial" FontSize="16" Visibility="Visible" Foreground="#CC119EDA"/>
            <Label x:Name= "lblCompany" Content= "Company *" HorizontalAlignment="Left" Margin="64,365,0,0" VerticalAlignment="Top" Width="95" FontFamily="Arial" FontSize="16" Visibility="Visible" Foreground="#CC119EDA"/>
            <Label x:Name= "lblRequired" Content="* required fields" HorizontalAlignment="Left" Margin="10,424,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.237,0" Width="160"/>
            <Label x:Name= "lblEmailDup" Visibility="Hidden" Content="E-mail exists." HorizontalAlignment="Left" Margin="278,172,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.152,0.01"/>
            <Label x:Name= "lblUserNameDup" Visibility="Hidden" Content="Username exists." HorizontalAlignment="Left" Margin="278,18,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.237,0" Width="160"/>
            <Label x:Name= "lblInvalidEmail" Visibility="Hidden" Content="Example: samensterk@example.com" HorizontalAlignment="Left" Margin="225,335,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.152,0.01"/>
            <Label x:Name= "lblInvalidUsername" Visibility="Hidden" Content="Username is not valid" HorizontalAlignment="Left" Margin="278,18,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.237,0" Width="160"/>
            <Label x:Name= "lblInvalidPass" Visibility="Hidden" Content="Example: 1234*Test" HorizontalAlignment="Left" Margin="225,230,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.237,0" Width="160"/>
            <Image x:Name="imgUserFalse" Visibility="Hidden" HorizontalAlignment="Left" Height="26" Margin="505,158,0,0" VerticalAlignment="Top" Width="26" Source="Resources/false.png"/>
            <Image x:Name="imgUserTrue" Visibility="Hidden" HorizontalAlignment="Left" Height="26" Margin="505,158,0,0" VerticalAlignment="Top" Width="26" Source="Resources/true.png"/>
            <Image x:Name="imgPassFalse" Visibility="Hidden" HorizontalAlignment="Left" Height="26" Margin="505,206,0,0" VerticalAlignment="Top" Width="26" Source="Resources/false.png"/>
            <Image x:Name="imgPassTrue" Visibility="Hidden" HorizontalAlignment="Left" Height="26" Margin="505,206,0,0" VerticalAlignment="Top" Width="26" Source="Resources/true.png"/>
            <Image x:Name="imgConfPassFalse" Visibility="Hidden" HorizontalAlignment="Left" Height="26" Margin="505,256,0,0" VerticalAlignment="Top" Width="26" Source="Resources/false.png"/>
            <Image x:Name="imgConfPassTrue" Visibility="Hidden" HorizontalAlignment="Left" Height="26" Margin="505,256,0,0" VerticalAlignment="Top" Width="26" Source="Resources/true.png"/>
            <Image x:Name="imgEmailFalse" Visibility="Hidden" HorizontalAlignment="Left" Height="26" Margin="505,305,0,0" VerticalAlignment="Top" Width="26" Source="Resources/false.png"/>
            <Image x:Name="imgEmailTrue" Visibility="Hidden" HorizontalAlignment="Left" Height="26" Margin="505,305,0,0" VerticalAlignment="Top" Width="26" Source="Resources/true.png"/>
            <Image x:Name="imgRegister" Visibility="Visible" HorizontalAlignment="Left" Height="137" Margin="224,0,0,0" VerticalAlignment="Top" Width="132" Source="Resources/login.png"/>


        </Grid>
        <PasswordBox x:Name="TxtPass" Grid.ColumnSpan="3" HorizontalAlignment="Left" Margin="160,237,0,0" VerticalAlignment="Top" Height="34" Width="238" TabIndex="1" BorderBrush="#CC119EDA"/>
        <Image x:Name="imgLogin" Visibility="Visible" Grid.ColumnSpan="3" Height="137" Margin="202,0,0,297" VerticalAlignment="Bottom" Source="Resources/login.png" HorizontalAlignment="Left" Width="132"/>
        <Label Grid.ColumnSpan="3" Content="No account yet? Get one now!" HorizontalAlignment="Left" Margin="160,347,0,0" VerticalAlignment="Top" Width="238" Height="30 " FontSize="16" Foreground="#CC119EDA" />
        <Label Grid.ColumnSpan="3" Content="Login" HorizontalAlignment="Left" Margin="239,159,0,0" VerticalAlignment="Top" Width="65" Height="34" FontSize="16" Foreground="#CC119EDA" />
        <Label Content="Register" HorizontalAlignment="Left" Margin="259,117,-336,0" VerticalAlignment="Top" Width="77" Height="35" FontSize="16" Foreground="#CC119EDA" Grid.Column="4" Visibility="Visible" />
    </Grid>
</controls:MetroWindow>
